﻿<%@ Page Title="" Language="C#" MasterPageFile="~/ws_appPrivada/msContenido.Master" AutoEventWireup="true" CodeBehind="wManPerfil.aspx.cs" Inherits="SRPCENTRIA.ws_appPrivada.wManPerfil" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

<script type="text/javascript" language="javascript">
    function mostrardiv() {
        div = document.getElementById('oculta1');
        div.style.display = "block";
    }

    function letras() {
        var key = window.event.keyCode;
        if (key < 48 || key > 57) {

        }
        else {
            window.event.keyCode = 0;
        }

    }

</script>
    <style type="text/css">
        .style1
        {
            width: 218px;
        }
        .style2
        {
            width: 362px;
        }
        .style3
        {
            width: 175px;
        }
    </style>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<form runat="server" id="form1">
&nbsp;<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
   
      <tr>
        <td width="14" background="images/caja04.gif">&nbsp;</td>
        <td bgcolor="#FFFFFF">
        <h1>Mantenimiento de Perfil</h1>
        <div class="round"><span class="top"><span></span></span>
          <div class="contenido">
          <h3>Buscar Perfil</h3>
<table width="100%" cellpadding="2" cellspacing="2">
  <tr>
   
    <td width="140px">Nombre de Perfil:</td>
    <td>
    
     <asp:TextBox ID="txtBuscar" class="formularios" Width="99%" runat="server" onblur="this.value = this.value.toUpperCase()"
            MaxLength="50"></asp:TextBox>            
            <cc1:FilteredTextBoxExtender ID="FtbeNomComercial" runat="server" 
            TargetControlID="txtBuscar" ValidChars="ABCDEFGHIJKLMNÑOPQRSTUVWXYZabcdefghijklmnñopqrstuvwxyz ">
            </cc1:FilteredTextBoxExtender>
    </td>
    <td width="130" align="center">
    <asp:Button ID="btnBuscar" runat="server" class="submitBtn" Text="Buscar" 
            onclick="btnBuscar_Click" />
    </td>
    </tr>
</table>
</div>
<span class="bottom"><span></span></span> </div>



<div class="round"><span class="top"><span></span></span>
          <div class="contenido">
          <h3>resultado</h3>
<p>

 <asp:HiddenField ID="hdnCodigo" runat="server"/>
  </p>
           

            <asp:Label ID="lblError" runat="server" BackColor="#9A5454" BorderStyle="None" 
Font-Strikeout="False" ForeColor="White" Visible="False" Width="100%"></asp:Label>
              <asp:GridView ID="grvDatos" class="tablaMain"   onselectedindexchanged="grvDatos_SelectedIndexChanged"             
                  AutoGenerateColumns="False" runat="server" AllowPaging="True" 
                 onpageindexchanging="grvDatos_PageIndexChanging" PageSize="5" >
                <Columns>
                <asp:BoundField HeaderText="Código" DataField="PK_IPER_IDPERFIL">
                <ItemStyle CssClass="columnaOscura" Width="1%" />  
                </asp:BoundField>

                <asp:BoundField HeaderText="Nombre" DataField="VPER_NOM_PERFIL">
                <ItemStyle CssClass="columnaOscura" />            
                </asp:BoundField>

                <asp:BoundField HeaderText="Estado" DataField="ESTADO">
                <ItemStyle CssClass="columnaOscura" Width="1%" />      
                </asp:BoundField>


                <asp:CommandField ButtonType="Image"  HeaderText="Editar" SelectImageUrl="~/images/ico_editar.gif"
                 ShowSelectButton="True" >
                    <ItemStyle Width="1%" />
                    </asp:CommandField>
                </Columns>
              </asp:GridView>


          </div>
<span class="bottom"><span></span></span> </div>
<asp:Panel ID="pnlmantenimieto" runat="server" CssClass="CajaDialogo" Width="100%">

<div class="round"><span class="top"><span></span></span>
          <div class="contenido">
          <h3>Nuevo / Editar Perfil</h3>

<table width="99%" cellpadding="2" cellspacing="2">
  <tr>
  
    <td width="110" >Descripción de Perfil :</td>
    <td class="style2">
    <asp:TextBox ID="txtdescripcion" class="formularios" onblur="this.value = this.value.toUpperCase()" runat="server" MaxLength="50" Width="99%"></asp:TextBox></td>
<%--    <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" 
            TargetControlID="txtdescripcion" ValidChars="ABCDEFGHIJKLMNÑOPQRSTUVWXYZabcdefghijklmnñopqrstuvwxyz.áéíóúÁÉÍÓÚ()- ">
            </cc1:FilteredTextBoxExtender>--%>
    <td  align="right"  >Estado:</td>
    <td  align="right"  > 
    <asp:CheckBox ID="chkEstado" runat="server" />    
    </td>
    <td  >
    <asp:Button ID="btnAgregar" runat="server" class="submitBtn" 
                  Text="Agregar Perfil" onclick="btnAgregar_Click"/>
                  <asp:Button ID="btnEditar" runat="server" class="submitBtn" 
                  Text="Selecionar Modulo /Editar" onclick="btnEditar_Click" 
            Visible=false/>
    </td>
    
  </tr>
   
</table>


<p>&nbsp;</p>
</div>


    <asp:GridView ID="grvDatos2" runat="server"
        AutoGenerateColumns="False" class="tablaMain" >
        <Columns>
            <asp:TemplateField HeaderText="Marcar">
                <ItemTemplate>
                    <asp:CheckBox ID="chk" runat="server" />
                </ItemTemplate>
                <ItemStyle Width="1%" />
            </asp:TemplateField>
            <asp:BoundField DataField="idmodulo" HeaderText="Codigo">
            <ItemStyle Width="1%" />
            </asp:BoundField>
            <asp:BoundField DataField="VMOD_NOMBRE_MODULO" HeaderText="Menú Padre">
            <ItemStyle CssClass="columnaOscura" Width="100px" />
            </asp:BoundField>
            <asp:BoundField DataField="ESTADO" HeaderText="Estado" Visible="False">
            <ItemStyle Width="1%" />
            </asp:BoundField>
        </Columns>
    </asp:GridView>

 </div>

</asp:Panel>
<p align="center">

  </p>
</td>
        <td width="14" background="images/caja05.gif">&nbsp;</td>
      </tr>
      <tr>
        <td width="14">&nbsp;</td>
        <td background="images/caja07.gif">&nbsp;</td>
        <td width="14">&nbsp;</td>
      </tr>
    </table>
</ContentTemplate>
</asp:UpdatePanel>
</form>

</asp:Content>
